package cn.edu.nwsuaf.examcenter.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.edu.nwsuaf.examcenter.service.LoginService;

@Controller
@RequestMapping(value="/manager")
public class ManagerController {
	@Resource(name="loginService")
	private LoginService managerService;
	
	@ResponseBody
	@RequestMapping(value="/updatePwd/{mno}",method=RequestMethod.POST)
	public String updatePwd(@PathVariable("mno")String mno,@RequestParam("mpassword")String mpassword){
		return managerService.updateManager(mno, mpassword);
	}
}
